@extends('admin.layout.layout', ['row' => @$page])

@section('contain')


    <div class="portlet">
        <div class="portlet-title">
            <div class="caption">
                <x-portlet-breadcrumb :page="$page"></x-portlet-breadcrumb>
            </div>
            <div class="actions"></div>
        </div>

        <div class="my-3 bg-light p-3 px-4">
            <div class="row">
                <div class="col-auto">
                    <b>{{ ts('rollnumber') }}</b>：
                    <span>{{ @$data->roll_number }}</span>
                </div>
                <div class="col-auto">
                    <b>{{ ts('filmtype') }}</b>：
                    <span>{{ ts('film_type_master.'.@$data->film_type_id) }}</span>
                </div>
                <div class="col-auto">
                    <b>{{ ts('rolllength') }}</b>：
                    <span>{{ @$data->length }} cm</span>
                </div>
                <div class="col-auto">
                    <b>{{ ts('RESIDUELENGTH') }}</b>：
                    <span>{{ getRestlenV3(@$data->roll_number) }} cm</span>
                </div>
                <div class="col-auto">
                    <b>{{ ts('ROLLWIDTH') }}</b>：
                    <span>{{ @$data->width }}</span>
                </div>
                <div class="col-auto">
                    <b>{{ ts('createdat') }}</b>：
                    <span>{{ fdate(@$data->created_at) }}</span>
                </div>
            </div>
        </div>

        <div>
            <h3 class="section_sub_title">{{ ts('XSJL') }}</h3>
            <table class="table table-s2 text-center">
                <thead>
                <tr>
                    <th>{{ ts('sequence') }}</th>
                    <th>{{ ts('ASSIGNLENGTH') }}</th>
                    {{--<th>{{ ts('GMSTYPE') }}</th>--}}
                    <th>{{ ts('distributor') }}</th>
                    <th>{{ ts('dealer') }}</th>
                    <th>{{ ts('DATESOLD') }}</th>
                    <th>{{ ts('bFPR') }}</th>
                </tr>
                </thead>
                <tbody>
                @foreach(@$assigns as $k=>$v)
                    <tr>
                        <td>{{ $k+1 }}</td>
                        <td>{{ @$v->length }} cm</td>
                        <td>{{ @$v->sdmc }}</td>
                        <td>
                            {{ @$v->jxsmc}}
                        </td>
                        <td>{{ fdate2(@$v->created_at) }}</td>
                        <td>{{ @$v->bfpr }}</td>
                    </tr>
                @endforeach
                </tbody>
            </table>
            <div class="text-danger"></div>

            <h3 class="section_sub_title">{{ ts('DHJL') }}</h3>
            <table class="table table-s2 text-center">
                <thead>
                <tr>
                    <th>{{ ts('sequence') }}</th>
                    <th>{{ ts('DHCD') }}</th>
                    <th>{{ ts('FQFSDMD') }}</th>
                    <th>{{ ts('JSFSDMD') }}</th>
                    <th>{{ ts('fqrq') }}</th>
                    <th>{{ ts('status') }}</th>
                    <th>{{ ts('xq') }}</th>
                </tr>
                </thead>
                <tbody>
                @foreach(@$transfer as $k=> $v)
                    <tr>
                        <td>{{ $k+1 }}</td>
                        <td>{{ @$v->length }}  cm</td>
                        <td>
                            @if($v->yuser_type == 3)
                                {{ @$v->ysdmc }} / {{ @$v->ygmsmc }}
                            @else
                                {{ @$v->ygmsmc }}
                            @endif
                        </td>
                        <td>
                            @if($v->xuser_type == 3)
                                {{ @$v->xsdmc }} / {{ @$v->xgmsmc }}
                            @else
                                {{ @$v->xgmsmc }}
                            @endif
                        </td>


                        <td>
                            {{ fdate2(@$v->created_at) }}
                        </td>
                        <td>
                            {{ ts('STA'.@$v->approved) }}
                        </td>
                        <td>
                            <a href="/admin/verify/transfer/{{ @$v->id }}">{{ ts('xq') }}</a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>

            <h3 class="section_sub_title">{{ ts('tHJL') }}</h3>
            <table class="table table-s2 text-center">
                <thead>
                <tr>
                    <th>{{ ts('sequence') }}</th>
                    <th>{{ ts('CHANGDU') }}</th>
                    <th>{{ ts('ysdmc') }}</th>
                    <th>{{ ts('ygmsmc') }}</th>
                    <th>{{ ts('fqrq') }}</th>
                    <th>{{ ts('status') }}</th>
                </tr>
                </thead>
                <tbody>
                @foreach(@$rRecords as $k=> $v)
                    <tr>
                        <td>{{ $k+1 }}</td>
                        <td>{{ @$v->length }} cm</td>
                        <td>
                            {{ @$v->sdmc }}
                        </td>
                        <td>
                            {{ @$v->jxsmc }}
                        </td>
                        <td>{{ fdate2(@$v->created_at) }}</td>
                        <td>
                            {{ ts('STA'.@$v->status) }}
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>


            <h3 class="section_sub_title">{{ ts('ZBJL') }}</h3>
            <table class="table table-s2 text-center">
                <thead>
                <tr>
                    <th>{{ ts('sequence') }}</th>
                    <th>{{ ts('YLCD2') }}</th>
                    {{--<th>{{ ts('precutid') }}</th>--}}
                    <th>{{ ts('warrantyid') }}</th>
                    <th>{{ ts('EFFECTIVEDATE') }}</th>
                    <th>{{ ts('zbxq') }}</th>
                </tr>
                </thead>
                <tbody>
                @foreach($wRecords as $k=>$v)
                    <tr>
                        <td>{{ $k+1 }}</td>
                        <td>{{ @$v->length }} cm</td>
                        {{--<td><a href="/admin/precut/{{ $v->pid }}">{{ @$v->p_id }}</a></td>--}}
                        <td><a href="/admin/warranty/{{ $v->wid }}">{{ @$v->w_id }}</a></td>
                        <td>
                            {{ fdate(@$v->effective_time) }}
                        </td>
                        <td><a href="/admin/warranty/{{ $v->wid }}">{{ ts('zbxq') }}</a></td>
                    </tr>
                @endforeach
                </tbody>
                </tfoot>
            </table>
            <div class="text-danger">
                {{--<p>1.质保包含待审核、审核通过、及审核拒绝的数据</p>
                <p>2.专享套餐仅包含尚未安装的数据</p>
                <p>3.质保的生效时间是审核通过或拒绝的时间，专享套餐的生效时间为创建时间</p>
                <p>4.由于历史数据，分配长度可能超过实际长度，或剩余长度与实际剩余不等</p>--}}
            </div>

            {{--<h3 class="section_sub_title">{{ ts('ZTZYTJJL') }}</h3>
            <table class="table table-s2 text-center">
                <thead>
                <tr>
                    <th>{{ ts('sequence') }}</th>
                    <th>{{ ts('YLCD2') }}</th>
                    <th>{{ ts('precutid') }}</th>
                    <th>{{ ts('warrantyid') }}</th>
                    <th>{{ ts('EFFECTIVEDATE') }}</th>
                </tr>
                </thead>
                <tbody>
                @foreach($pRecords as $k=>$v)
                    @php
                    $pw = gWP(@$v->id);
                    @endphp
                    <tr>
                        <td>{{ $k+1 }}</td>
                        <td>{{ @$v->length }} cm</td>
                        <td><a href="/admin/precut/{{ @$v->pid }}">{{ @$v->p_id }}</a></td>
                        <td><a href="/admin/warranty/{{ @$pw->id }}">{{ @$pw->warranty_id }}</a></td>
                        <td>
                            @if(@$v->status == 1)
                                {{ fdate(@$pw->approved_date) }}
                            @endif
                        </td>
                    </tr>
                @endforeach
                </tbody>
                </tfoot>
            </table>--}}
        </div>

    </div>


@endsection

@section('script')

@endsection